package com.yeyks.config.dal.dao;

import com.github.pagehelper.PageInfo;
import com.yeyks.config.dal.domain.DocInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * <p>
 * 文档表 Mapper 接口
 * </p>
 *
 * @author yun
 * @since 2019-06-25
 */
public interface DocInfoMapper extends BaseMapper<DocInfo> {
    int insertReturnId(DocInfo record);

    List<Map> selectByDirectorKeyword(
            @Param("directory") Boolean directory, @Param("keyword") String keyword,
            @Param("offset") Integer offset, @Param("maxrow") Integer maxrow);

    List<Map> selectByParentKeyword(@Param("parent") Integer parent, @Param("keyword") String keyword,
                                    @Param("offset") Integer offset, @Param("maxrow") Integer maxrow);

    int selectByDirectorKeywordCount(
            @Param("directory") Boolean directory, @Param("keyword") String keyword);

    int selectByParentKeywordCount(@Param("parent") Integer parent, @Param("keyword") String keyword);

    List<DocInfo> selectByCaption(@Param("caption") String caption);

    int updateCaptionContent(DocInfo record);

    int deleteByPrimaryKey(Integer id);

    DocInfo selectByPrimaryKey(Integer id);

    List<DocInfo> selectAll();

    int updateByPrimaryKey(DocInfo record);

}
